package com.realtyManage.springboot.Dao;


import com.realtyManage.springboot.Model.Do.Appointment;
import com.realtyManage.springboot.Model.Do.Area;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;

/**
 * 预约信息
 *
 * @author 杭州素色网络科技有限公司
 * @since 2019-09-19
 */

@Repository
public interface AppointmentRepository extends JpaRepository<Appointment, Integer>, JpaSpecificationExecutor<Appointment> {

    @Transactional
    @Modifying
    @Query(value="delete appointment where id in (?1) ",nativeQuery=true)
    int deleteAppointment(String areaId);

}
